package com.lagou.ioc;

import com.lagou.service.UserService;

import java.util.*;

/**
 * @author yangpeng
 * @time 2020/4/24
 * @since 1.0.0
 */
public class ApplicationContext {
    public Object getBean(String className) throws ClassNotFoundException {
        if(className.contains(".")){
            Class<?> aClass = Class.forName(className);
            return AnnotationBeanFactory.getBean(aClass);
        }
        return AnnotationBeanFactory.getBean(className);
    }
}
